#include "stdio.h"
#include "stdlib.h"
#include "string.h"
//演示通过把静态存储区数据返回上层调用函数
//演示通过全局变量返回上层调用函数
//演示通过stack变量返回给上层函数

//debug release
char * Demo33_Number2String_stack(int i)
{
	char tmp[10];
	memset(tmp, 0, sizeof(tmp));
	if (i==1) 
	{ 
		strcpy(tmp, "one");
	} 
	else if (i==2) 
	{
		strcpy(tmp, "two");
	} 
	else if (i==3) 
	{
		strcpy(tmp, "three");
	} 
	else 
	{
		strcpy(tmp, "err");
	}
	return tmp ;
}

int main()
{
	
	char	*p = NULL;

	p = Demo33_Number2String_stack(1);
	printf("output: %s \n", p);

	return 0; 
}


